<!-- 父组件 -->
<template>
    <div>
        <h3>App</h3>
        <button @click="fn">Children</button>
        <hr>
        <Child></Child>
        <Child></Child>
    </div>
</template>

<script>
import Child from '@/components/Child.vue'

export default {
    components: {Child},
    methods: {
        fn() {
            console.log(this.$children) // 数组
            this.$children.forEach(item=>{
                if(item.addNum){
                    item.addNum()
                }
            })
        }
    }
}
</script>